package org.example.controller;

import com.jiutianjia.auth.dto.LoginDto;
import com.jiutianjia.exception.JtjException;
import com.jiutianjia.member.utils.ResultData;
import org.example.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Description: 登录业务接口
 * Author: 乔包包
 * Date: 2023/11/25
 */
@RestController
@RequestMapping("/account")
public class LoginController {
    @Autowired
    private LoginService loginService;
    @RequestMapping("/login")
    public ResultData login(@RequestBody LoginDto loginDto) throws JtjException {
        return loginService.login(loginDto);
    }
}
